package com.woniuxy.controller;

import com.woniuxy.entity.PatientSurgeryList;
import com.woniuxy.entity.dto.PatientSurgeryDTO;
import com.woniuxy.service.PatientSurgeryListService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/patientsurgery")
public class PatientSurgeryListController {
    @Autowired
    PatientSurgeryListService patientSurgeryListService;

    @PostMapping("/querylist")
    public ResponseData queryList(@RequestBody PageParam<PatientSurgeryDTO> pageParam){
        return patientSurgeryListService.queryList(pageParam);
    }
    @PostMapping ("/updatestatus")
    public ResponseData updateStatus(@RequestBody PatientSurgeryList patientSurgeryList){
        return patientSurgeryListService.updateStatus(patientSurgeryList);
    }
    @PostMapping("addSMItem")
    public ResponseData<?> addSMItem(@RequestBody PatientSurgeryDTO psDTO){
        return patientSurgeryListService.addSMItem(psDTO);
    }
}
